/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const authCenterRouter = {
  path: '/views/AuthCenter',
  component: Layout,
  //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
  redirect: 'noRedirect',
  // alwaysShow: true, //一直显示根路由
  name: 'authCenter',
  meta: {
    title: '授权中心',
    icon: 'payment',
    roles: ['admin', 'user']
  }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
  children: [
    {
      path: '/views/AuthCenter/authSet',
      component: () => import('@/views/AuthCenter/authSet'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '授权中心设置',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/AuthCenter/XghAuthorizationCenterOrdersList',
          component: () => import('@/views/AuthCenter/XghAuthorizationCenterOrdersList'), // 订单管理
          name: 'billCollectionSettlement',
          meta: {
            title: '订单管理',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/paymentManage/paymentBill/billPaymentSettlement',
          component: () => import('@/views/paymentManage/paymentBill/billPaymentSettlement'), // 付款结算单
          name: 'billPaymentSettlement',
          meta: {
            title: '付款结算单',
            roles: ['admin', 'user']
          }
        },
      ]
    },
    {
      path: '/views/paymentManage/paymentRecord',
      component: () => import('@/views/paymentManage/paymentRecord/index'),
      //当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
      redirect: 'noRedirect',
      // alwaysShow: true, //一直显示根路由
      meta: {
        title: '记录',
        roles: ['admin', 'user']
      }, //你可以在根路由设置权限，这样它下面所有的子路由都继承了这个权限
      children: [{
          path: '/views/paymentManage/paymentRecord/receivables',
          component: () => import('@/views/paymentManage/paymentRecord/receivables'), // 应收款管理
          name: 'receivables',
          meta: {
            title: '应收款管理',
            roles: ['admin', 'user']
          }
        },
        {
          path: '/views/paymentManage/paymentRecord/payable',
          component: () => import('@/views/paymentManage/paymentRecord/payable'), // 应付款管理
          name: 'payable',
          meta: {
            title: '应付款管理',
            roles: ['admin', 'user']
          }
        },
      ]
    },
  ]
}
export default authCenterRouter
